<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>礼券信息</a></li>
        <if condition="comm_auth_check('add')">
            <li><a href="{:url('AdminCardType/add')}">新增礼券</a></li>
        </if>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('AdminCardType/index')}">
        关键字：
        <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
            placeholder="名称/规格">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('AdminCardType/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>编号</th>
                <th>名称</th>
                <th>规格</th>
                <th>描述</th>
                <th>图片</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.spk}</td>
                    <td>{$vo.desc}</td>
                    <td>
                        <img style="height:100px" src="{:cmf_get_image_preview_url($vo.img)}" alt="">
                    </td>
                    <td>
                        
                        <if condition="comm_auth_check('edit')">
                            <a href='{:url("AdminCardType/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
                        </if>
                        <if condition="comm_auth_check('delete')">
                            | <a class="js-ajax-delete" href="{:url('AdminCardType/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>